import { FC } from "react"
import { useSelector } from "react-redux/es/hooks/useSelector"

import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
import { BetType } from "@/interface/store/config"
import { useLocale } from "@/locales"
import { AppState } from "@/stores"
// import { TableColumnType } from "antd"
// import dynamicComponent from "./dynamicImport"

const BetStatus: FC = () => {
	const { newFormat } = useLocale()
	const { betTypes } = useSelector((state: AppState) => state.config)

	const options = [] as { label: string; value: number }[]
	;(betTypes as BetType[]).forEach(p => {
		p.subList?.forEach(c => {
			options.push({
				label: c.desc === "手牌服务费" ? "俱乐部游戏" : c.desc,
				value: c.type
			})
		})
	})
	return (
		<SFormItem name="betType" label={newFormat("label.bet.parentBetType")}>
			<StyleSelect options={options} placeholder={newFormat({ id: "label.select_all" })} w={200} allowClear />
		</SFormItem>
	)
}

export default BetStatus
